package loader.parser.adapter;

import java.util.HashMap;

public abstract class SiteAdapter {

	private static HashMap<String, Integer> maps = new HashMap<String, Integer>();
	static {
		maps.put("id", 30);
		maps.put("website", 20);
		maps.put("oid", 20);
		maps.put("title", 400);
		maps.put("dealUrl", 256);
		maps.put("sImageUrl", 128);
		maps.put("mImageUrl", 128);
		maps.put("lImageUrl", 128);

		maps.put("cityName", 2048);
		maps.put("category", 20);
		maps.put("tips", 1024);

		maps.put("price", 20);
		maps.put("dealValue", 20);
		maps.put("discountPercent", 20);
		maps.put("startTime", 20);
		maps.put("endTime", 20);
		maps.put("createTime", 30);
		maps.put("dealDesc", 1024);
		maps.put("salesNum", 10);

		maps.put("shopName", 80);
		maps.put("shopUrl", 128);
		maps.put("shopPhone", 80);
		maps.put("shopAddress", 255);
		maps.put("shopArea", 40);
		maps.put("longtitude", 20);
		maps.put("latitude", 20);
		maps.put("dealId", 30);
		/** division **/
		maps.put("pyName", 25);
		maps.put("name", 20);
		maps.put("timezone", 25);
		maps.put("timezone_offset_gmt", 6);
		maps.put("latitude", 20);
		maps.put("longtitude", 20);

	}

	public abstract String getProperName(String oName);

	public Integer getPropertyLength(String oName) {
		return maps.get(oName);
	}

	public abstract String getFullUrl(String city);

	public abstract String getCitiesUrl();

	public abstract String getFileDir();

	public abstract boolean isNewDeal(String nodeName);

	public abstract boolean isNewShop(String nodeName);

	public abstract boolean isNewCity(String nodeName);

	public abstract String getSiteName();
}
